import { Comment, List ,Divider,Typography} from 'antd';
import React from 'react'
import './mycomment.css'
interface propstype{
    data:any[]
}
const MyComment:React.FC<propstype>=({data})=>{
    return(
        <div className="comment">
            <Divider orientation="center">
                <Typography.Title level={3}>客户评论</Typography.Title>
            </Divider>
            <List
                className="comment-list"
                header={`${data.length} replies`}
                itemLayout="horizontal"
                dataSource={data}
                renderItem={item => (
                    <li>
                        <Comment
                            author={item.author}
                            avatar={item.avatar}
                            content={item.content}
                            datetime={item.createDate}
                        />
                    </li>
                )}
            />
        </div>
    )
}
export default MyComment